﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pahan.McuFusion.Common;
using Pahan.McuFusion.Common.Serialization;

namespace Pahan.McuFusion.Atmel.AVR
{
    /// <summary>
    /// Surrogate for <see cref="AvrMcuInfo"/> class.
    /// </summary>
    public class AvrMcuInfoSurrogate : BuilderBase<AvrMcuInfo>
    {
        protected override AvrMcuInfo CreateInstance()
        {
            return new AvrMcuInfo(
                Model,
                ModelCode.ToArray(),
                Memory.Select(s => s.Build()).ToArray());
        }

        public String Model
        {
            get;
            set;
        }

        public IList<byte> ModelCode
        {
            get;
            set;
        }

        public IList<AvrMemoryClassInfoSurrogate> Memory
        {
            get;
            set;
        }

    }
}
